﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Configurations
{
    public interface IConfigurationNodeCollection : 
        IEnumerable<IConfigurationNode>, IEnumerator<IConfigurationNode>
    {
        /// <summary>
        /// 添加节点
        /// </summary>
        /// <param name="node"></param>
        void Add(IConfigurationNode node);

        /// <summary>
        /// 根据序列查询
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        IConfigurationNode this[int index] { get;}

        /// <summary>
        /// 取得单一的节点
        /// </summary>
        /// <param name="nodeName"></param>
        /// <returns></returns>
        IConfigurationNode this[string nodeName] { get;}

        /// <summary>
        /// 是否包含指定的节点
        /// </summary>
        /// <param name="nodeName"></param>
        /// <returns></returns>
        bool Contains(string nodeName);

        /// <summary>
        /// 总节点数据
        /// </summary>
        int Count { get;}
    }
}
